package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbOfflineTaskTargetMapper;
import com.ruoyi.system.domain.TbOfflineTaskTarget;
import com.ruoyi.system.service.ITbOfflineTaskTargetService;

/**
 * 离线包虚拟任务目标设备Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-03
 */
@Service
public class TbOfflineTaskTargetServiceImpl implements ITbOfflineTaskTargetService 
{
    @Autowired
    private TbOfflineTaskTargetMapper tbOfflineTaskTargetMapper;

    /**
     * 查询离线包虚拟任务目标设备
     * 
     * @param id 离线包虚拟任务目标设备主键
     * @return 离线包虚拟任务目标设备
     */
    @Override
    public TbOfflineTaskTarget selectTbOfflineTaskTargetById(Long id)
    {
        return tbOfflineTaskTargetMapper.selectTbOfflineTaskTargetById(id);
    }

    /**
     * 查询离线包虚拟任务目标设备列表
     * 
     * @param tbOfflineTaskTarget 离线包虚拟任务目标设备
     * @return 离线包虚拟任务目标设备
     */
    @Override
    public List<TbOfflineTaskTarget> selectTbOfflineTaskTargetList(TbOfflineTaskTarget tbOfflineTaskTarget)
    {
        return tbOfflineTaskTargetMapper.selectTbOfflineTaskTargetList(tbOfflineTaskTarget);
    }

    /**
     * 新增离线包虚拟任务目标设备
     * 
     * @param tbOfflineTaskTarget 离线包虚拟任务目标设备
     * @return 结果
     */
    @Override
    public int insertTbOfflineTaskTarget(TbOfflineTaskTarget tbOfflineTaskTarget)
    {
        tbOfflineTaskTarget.setCreateTime(DateUtils.getNowDate());
        return tbOfflineTaskTargetMapper.insertTbOfflineTaskTarget(tbOfflineTaskTarget);
    }

    /**
     * 修改离线包虚拟任务目标设备
     * 
     * @param tbOfflineTaskTarget 离线包虚拟任务目标设备
     * @return 结果
     */
    @Override
    public int updateTbOfflineTaskTarget(TbOfflineTaskTarget tbOfflineTaskTarget)
    {
        tbOfflineTaskTarget.setUpdateTime(DateUtils.getNowDate());
        return tbOfflineTaskTargetMapper.updateTbOfflineTaskTarget(tbOfflineTaskTarget);
    }

    /**
     * 批量删除离线包虚拟任务目标设备
     * 
     * @param ids 需要删除的离线包虚拟任务目标设备主键
     * @return 结果
     */
    @Override
    public int deleteTbOfflineTaskTargetByIds(Long[] ids)
    {
        return tbOfflineTaskTargetMapper.deleteTbOfflineTaskTargetByIds(ids);
    }

    /**
     * 删除离线包虚拟任务目标设备信息
     * 
     * @param id 离线包虚拟任务目标设备主键
     * @return 结果
     */
    @Override
    public int deleteTbOfflineTaskTargetById(Long id)
    {
        return tbOfflineTaskTargetMapper.deleteTbOfflineTaskTargetById(id);
    }
}
